package com.ztesoft.sca.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.ztesoft.sca.dao.TaskDao;
import com.ztesoft.sca.model.AudioSourceDto;
import com.ztesoft.sca.model.DataSetModel;
import com.ztesoft.sca.model.QcSceneModel;
import com.ztesoft.sca.model.ScaAudioResult;
import com.ztesoft.sca.model.TaskAudioRelaModel;
import com.ztesoft.sca.model.TaskModel;

import oracle.sql.CLOB;


@Component
public class TaskServiceImpl implements TaskService{
	
	@Autowired
	private TaskDao taskDao;
	
    @Override
    public void addTask(TaskModel aiTask) throws Exception {
    	taskDao.addTask(aiTask);
    }
    
    @Override
    public List<TaskModel> selectAichatTaskList(String receiveStatus) throws Exception {
    	return taskDao.selectAichatTaskList(receiveStatus);
    }
 
    @Override
    public void updateAiChatTaskInStr(List<Long> listId) throws Exception {
    	taskDao.updateAiChatTaskInStr(listId);
    }
    
    @Override
    public List<TaskModel> listTask(long id, int from, int size) throws Exception {
    	return taskDao.listTask(id,from,size);
    }

	@Override
	public List<TaskModel> detailTask(TaskModel aiChat) throws Exception {
		return taskDao.detailTask(aiChat);
	}

	@Override
	public List<DataSetModel> jobTabledataSet(Long jobId) throws Exception {
		return taskDao.jobTabledataSet(jobId);
	}

	@Override
	public CLOB jobTableruleCheckResult(Long jobId) throws Exception {
		return taskDao.jobTableruleCheckResult(jobId);
	}

	@Override
	public List<AudioSourceDto> detailAudioSourceTask(AudioSourceDto aiChatAudio, Long jobId) throws Exception {
		return taskDao.detailAudioSourceTask(aiChatAudio,jobId);
	}

	@Override
	public List<AudioSourceDto> selectAudioSourceList(AudioSourceDto aiAudio) throws Exception {
		return taskDao.selectAudioSourceList(aiAudio);
	}

	@Override
	public List<QcSceneModel> selectSceneList(Long sceneId) throws Exception {
		return taskDao.selectSceneList(sceneId);
	}

	@Override
	public void updateAudioSourceTask(List<AudioSourceDto> listUpdate) throws Exception {
		 taskDao.updateAudioSourceTask(listUpdate);
	}

	@Override
	public void addAudioTask(List<TaskAudioRelaModel> listAddAudioTask) throws Exception {
		 taskDao.addAudioTask(listAddAudioTask);
	}

	@Override
	public void addAudioResult(List<ScaAudioResult> listAddAudioResult) throws Exception {
		taskDao.addAudioResult(listAddAudioResult);
	}

	@Override
	public void updateAudioResult(List<ScaAudioResult> listUpdateAudioResult) throws Exception {
		taskDao.updateAudioResult(listUpdateAudioResult);
	}
}
